import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home/Home";
import About from "../views/About/About.vue";
import Piano from "../views/Piano/Piano.vue";
import Mine from "../views/Mine/Mine.vue";
import Detail from "../views/Detail/Detail.vue";
import Rank from "../views/Rank/Rank.vue";
import Play from "../views/Play/Play.vue";
import Play2 from "../views/Play/Play2.vue"

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
    meta: {
      title: '首页'
    },
  },
  {
    path: "/about",
    name: "About",
    component: About,
    meta: {
      title: '推荐'
    }
  },
  {
    path: "/piano",
    name: "Piano",
    component: Piano,
    meta: {
      title: '弹奏'
    }

  },
  {
    path: "/mine",
    name: "Mine",
    component: Mine,
    meta: {
      title: '我的'
    }
  },
  {
    path: "/detail/:id",
    name: "Detail",
    component: Detail,
    meta: {
      title: '详情页'
    }
  },
  {
    path: "/rank/:idx",
    name: "Rank",
    component: Rank,
    meta: {
      title: '排行榜'
    }
  },
  {
    path: "/play/:id",
    name: "Play",
    component: Play,
    meta: {
      title: '歌曲'
    }
  },
  {
    path: "/play2/:id/:urlid",
    name: "Play2",
    component: Play2,
    meta: {
      title: '电台'
    }
  },
  
  


];

const router = new VueRouter({
  routes
});

export default router;
